package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.victor.dao.CollectionLabelDao;
import com.victor.entity.CollectionLabel;
import com.victor.service.CollectionService;
@Service
public class CollectionServiceImpl implements CollectionService{
	@Autowired
	private CollectionLabelDao collectionlabelDao;
	@Override
	public boolean add(CollectionLabel myCollection) {
		return collectionlabelDao.insertSelective(myCollection);
	}

	@Override
	public PageInfo<CollectionLabel> selAllLabel(int page, int row, String uid) {
		PageHelper.startPage(page, row);
		List<CollectionLabel> list = collectionlabelDao.selAllLabel(uid);
		return new PageInfo<>(list, 5);
	}

}
